<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			function showtime() {
				var time = new Date();
				var year = time.getFullYear();
				var month = time.getMonth();
				var day = time.getDate();
				var weekday=time.getDay();
				var hour = time.getHours();
				var minute = time.getMinutes();
				var second = time.getSeconds();
				document.getElementById("time").innerHTML = "当前时间：" + year + "年" + (month + 1) + "月" + day + "日，星期" +weekday+","+ hour + ":" + minute + ":" + second;
			}
			setInterval("showtime()", 1000);
		</script>
	</head>
	<body>
		<div id="time"></div>
	</body>

</html>